<?php
/**
 * Object Relational Persistence Mapping Class for table: rad_type
 *
 * @package	com.athena
 * @author	LHV
 */
class RadType extends ORDataObject {

	/**#@+
	 * Fields of table: rad_type mapped to class members
	 */
	var $rad_type_id		= '';
	var $enum_rad_type		= '';
	var $enum_payment_type	= '';
	/**#@-*/


	/**
	 * DB Table
	 */
	var $_table = 'rad_type';

	/**
	 * Primary Key
	 */
	var $_key = 'rad_type_id';

	/**
	 * Internal Name
	 */
	var $_internalName = 'RadType';

	/**
	 * Handle instantiation
	 */
	function RadType() {
		parent::ORDataObject();
	}

	/**
	 * Get object by given rad type enumeration value
	 *
	 * @param int $enumRadType
	 */
	public function getObjectByRadType($enumRadType) {
        $sql  =   "SELECT $this->_key id FROM $this->_table WHERE enum_rad_type=$enumRadType";
        $res  =   $this->_execute($sql);
        $obj  =   Celini::newORDO('RadType', $res->fields['id']);

        return $obj;
	}

	/**#@+
     * Gettters
     */
	public function getEnumPaymentType() {
		return $this->enum_payment_type;
	}
    /**#@-*/
}
?>
